extends AnimatedSprite2D

var is_shown : bool = false

func cat_show() -> void:
	is_shown = true
	show()
	play()

func cat_hide() -> void:
	is_shown = false
	hide()
	stop()

func _process(_delta):
	if !is_shown: return

	if position.x <= -200:
		cat_hide()
		return

	position.x -= 500*_delta
